package com.leizi.igym.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @Author: leizi0110
 * @CreateTime: 2024-04-03  18:59
 * @Description:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(description = "会员分页返回的数据格式")
public class MemberVO implements Serializable  {
    @Serial
    private static final long serialVersionUID = 9208815034119297073L;

    @Schema(name = "主键值")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Schema(name = "会员姓名")
    private String memberName;

    @Schema(name = "会员头像")
    private String avatar;

    @Schema(name = "会员性别")
    private int gender;

    @Schema(name = "会员年龄")
    private int age;

    @Schema(name = "会员等级")
    private String level;

    @Schema(name = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;

    @Schema(name = "过期时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate expireTime;

    @Schema(name = "会员电话")
    private String phone;

    @Schema(name = "会员用户id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;
}
